package com.jisf.driver.controller;

import com.jisf.driver.entity.vo.DrivingSchoolLogRequestVo;
import com.jisf.driver.entity.vo.DrivingSchoolLogResponseVo;
import com.jisf.driver.response.Result;
import com.jisf.driver.service.DrivingSchoolLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname DrivingSchoolLogController
 * @Description TODO
 * @Date 2022/5/24 20:11
 * @Created by jisf：【429627912@qq.com】
 */
@RestController
@RequestMapping("driver/log")
public class DrivingSchoolLogController {

    @Autowired
    private DrivingSchoolLogService drivingSchoolLogService;

    @PostMapping("selectLog")
    @PreAuthorize("hasAnyAuthority('log:selectLog')")
    public Result<?> selectLog(@RequestBody DrivingSchoolLogRequestVo drivingSchoolLogRequestVo){
        DrivingSchoolLogResponseVo drivingSchoolLogResponseVo = drivingSchoolLogService.selectLog(drivingSchoolLogRequestVo);
        return Result.ok(drivingSchoolLogResponseVo);
    }
}
